//
//  AboutUVC.m
//  UHealth
//
//  Created by hanyou on 15/3/18.
//  Copyright (c) 2015年 gjtx. All rights reserved.
//

#import "AboutUVC.h"
#import "NavView.h"

@interface AboutUVC ()

@end

@implementation AboutUVC

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
        self.view.backgroundColor = kBlueColor;
    }
    return self;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    
    NavView *nav = [[NavView alloc]initWithFrame:CGRectMake(0, 0, WIDTH, kNavHeight) andTitleStr:kLocal(@"aboutU") andVC:self];
    [self.view addSubview:nav];
    
    UIImage *image = [[UIImage imageNamed:@"start_logo"] stretchableImageWithLeftCapWidth:10 topCapHeight:10];//拉伸图片的时候让图片不变形
    UIImageView *img = [[UIImageView alloc]initWithImage:image];
//    img.frame = CGRectMake(60, (HEIGHT - (WIDTH - 120))/2, WIDTH - 120, WIDTH - 120);
    img.frame = CGRectMake(0, kNavHeight, WIDTH, HEIGHT-kNavHeight);
    [self.view addSubview:img];
    
    UILabel *l = [[UILabel alloc]initWithFrame:CGRectMake(40,HEIGHT - 50-40, WIDTH - 80, 40)];
    [l setTextColor:[UIColor whiteColor]];
    NSString *app_Version = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"];// app版本
    NSString *app_build = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"];// app构建
    l.textAlignment = NSTextAlignmentCenter;
    l.text = [NSString stringWithFormat:@"%@: V%@(%@)",kLocal(@"current_version"),app_Version,app_build];
    l.textColor = [UIColor blackColor];
    [self.view addSubview:l];


    // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

#pragma mark - func
-(void)BtnClick:(UIButton *)btn
{
    if (btn.tag == 100) {
        
    }else{
        [self dismissViewControllerAnimated:YES completion:nil];
    }
}


@end
